package com.yugao.fintech.antelope.member;

import com.alibaba.cloud.nacos.NacosServiceAutoConfiguration;
import com.yugao.fintech.antelope.member.model.rqrs.user.MemberUserRegisterReq;
import com.yugao.fintech.antelope.member.model.rqrs.user.MemberUserResp;
import com.yugao.fintech.antelope.member.model.rqrs.user.MemberUserUpdateReq;
import com.yugao.fintech.antelope.base.model.constants.ServiceCodeCons;
import com.yugao.fintech.framework.core.response.Resp;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.cloud.openfeign.FeignAutoConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;


@FeignClient(contextId = "memberRemote", value = ServiceCodeCons.MEMBER_SERVICE)
@ConditionalOnClass({FeignAutoConfiguration.class, NacosServiceAutoConfiguration.class})
public interface MemberRemote {
    @PostMapping(value = "/app/member/user/register")
    Resp<MemberUserResp> registerUserIfAbsent(@RequestBody MemberUserRegisterReq req);

    @PostMapping(value = "/member/user/update")
    Resp<?> updateUser(@RequestBody MemberUserUpdateReq req);
}
